<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>

    <typeAliases>
        <typeAlias alias="Category" type="models.entities.CategoryEntity"/>
    </typeAliases>

    <environments default="mysql">
        <environment id="prod">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url"
                          value="jdbc:mysql://localhost:3306/play?useEncoding=true&amp;characterEncoding=UTF-8&amp;allowMultiQueries=true"/>
                <property name="username" value="play"/>
                <property name="password" value="play"/>
            </dataSource>
        </environment>
        <environment id="mysql">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url"
                          value="jdbc:mysql://localhost:3306/dbs?useEncoding=true&amp;characterEncoding=UTF-8&amp;allowMultiQueries=true"/>
                <property name="username" value="play"/>
                <property name="password" value="play"/>
            </dataSource>
        </environment>
        <environment id="mysql-dev">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url"
                          value="jdbc:mysql://localhost:3306/dbsdev?useEncoding=true&amp;characterEncoding=UTF-8&amp;allowMultiQueries=true"/>
                <property name="username" value="play"/>
                <property name="password" value="play"/>
            </dataSource>
        </environment>
        <environment id="h2">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="org.h2.Driver"/>
                <property name="url"
                          value="jdbc:h2:file:C:/projects/dbsj/db/h2/play;FILE_LOCK=NO;MODE=MYSQL"/>
                <property name="username" value="sa"/>

            </dataSource>
        </environment>
        <environment id="h2unix">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="org.h2.Driver"/>
                <property name="url"
                          value="jdbc:h2:file:db/h2/play;MODE=MYSQL;FILE_LOCK=NO"/>
                <property name="username" value="sa"/>

            </dataSource>
        </environment>
    </environments>

    <mappers>
        <mapper resource="mybatis/conf/mysql/category.xml"/>
        <mapper resource="mybatis/conf/mysql/product.xml"/>
        <mapper resource="mybatis/conf/mysql/user.xml"/>
        <mapper resource="mybatis/conf/mysql/shoppingcart.xml"/>
        <mapper resource="mybatis/conf/mysql/order.xml"/>
        <mapper resource="mybatis/conf/mysql/image.xml"/>
        <mapper resource="mybatis/conf/mysql/crawler.xml"/>
        <mapper resource="mybatis/conf/mysql/brand.xml" />
    </mappers>

</configuration>